user = {'account': 'lisi', 'password': '123456'}
ID = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
kinds = ['吃饭支出', '工资收入', '服装指出', '吃饭支出', '股票收入', '股票收入', '工资收入', '礼金支出', '其他支出', '交通支出', '吃饭支出', '工资收入', '交通支出', '工资收入']
zhanghu = ['交通银行', '现金', '现金', '现金', '工商银行', '工商银行', '交通银行', '现金', '现金', '交通银行', '工商银行', '现金', '现金', '现金']
count = [247.0, 12345.0, 1998.0, 325.0, 8000.0, 5000.0, 5000.0, 5000.0, 1560.0, 2300.0, 1000.0, 1000.0, 2000.0, 5000.0]
time = ['2016-03-02', '2016-03-15', '2016-04-02', '2016-06-18', '2016-10-28', '2016-10-28', '2016-10-28', '2016-10-28',
        '2016-10-29', '2016-10-29', '2016-10-29', '2016-10-30', '2016-10-30', '2016-10-30']
explan = ['家庭聚餐', '开工资了', '买衣服', '朋友聚餐', '股票大涨', '股票又大涨', '又开工资了', '朋友结婚', '丢钱了', '油价还在涨', '又吃饭', '开资', '机票好贵', '又开资']
account = input("请输入账户：")
password = input("请输入密码：")
lock = 0
while lock < 3:
    if account == user['account'] and password == user['password']:
        print("登录成功！")
        a = int(input("选择1.查询所有 2.按条件查询\n"))
        if a == 1:
            for i, j, k, l, m, n in zip(ID, kinds, zhanghu, count, time, explan):
                print(i, j, k, l, m, n)
        elif a == 2:
            b = int(input("请选择查询条件1. ID 2.类别 3.账户 4.金额 5.时间 6.说明\n"))
            if b == 1:
                for i in ID:
                    print(i)
            elif b == 2:
                for i in kinds:
                    print(i)
            elif b == 3:
                for i in zhanghu:
                    print(i)
            elif b == 4:
                for i in count:
                    print(i)
            elif b == 5:
                for i in time:
                    print(i)
            elif b == 6:
                for i in explan:
                    print(i)
        break
    elif account == user['password'] or account != user['account']:
        print("账户输入错误！")
        account = input("请再次输入账户：")
        password = input("请再次输入密码：")
        lock += 1
        continue
    elif account == user['account'] and account != user['password']:
        print("密码输入错误！")
        account = input("请再次输入账户：")
        password = input("请再次输入密码：")
        lock += 1
        continue
    elif account != user['account'] and account != user['password']:
        print("账户或密码输入错误！")
        account = input("请再次输入账户：")
        password = input("请再次输入密码：")
        lock += 1
        continue
else:
    print("您已连续三次输入账号或密码错误，无法登录！")
